package io.github.talelin.latticy.service.ag;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.github.talelin.latticy.dto.ag.room.CreateOrUpdateRoomDTO;
import io.github.talelin.latticy.model.ag.RoomDO;
import io.github.talelin.latticy.model.ag.RoomDetailDO;

import java.util.List;

public interface RoomService {
    //根据id查房间
    RoomDO getById(int id);
    //查询所有
    List<RoomDetailDO> getRooms();
    //根据楼栋Id查询房间
    List<RoomDetailDO> getRoomsByBuildingId(int buidlingId);
    //创建楼栋
    boolean createRoom(CreateOrUpdateRoomDTO validator);
    //删除楼栋
    boolean deleteById(int id);
    //修改楼栋
    boolean updateRoom(RoomDO building,CreateOrUpdateRoomDTO validator);
    //分页查询
    IPage<RoomDetailDO> getRoomByPage(Page<RoomDetailDO> pager);
    //模糊查询
    IPage<RoomDetailDO> searchRoomByKeyword(Page<RoomDetailDO> pager, String keyword);
}
